package io.xxx.omni.osc.sync

import com.alibaba.fastjson.JSONObject
import io.xxx.omni.osc.domain.Document
import io.xxx.omni.osc.domain.DocumentType
import io.xxx.omni.osc.domain.PlatformIdentity
import org.springframework.stereotype.Component

/**
 * 考拉
 */
// https://open.kaola.com/open/document/9003/9006
abstract class KlPorter : GenericPageDocumentPorter(), PlatformIdentity.KaoLa {

    override fun getResponse(context: JobContext, pageNo: Int, hasTotal: Boolean): JSONObject {
        TODO("Not yet implemented")
    }
}

// 订单
@Component
class KlTradePorter : KlPorter() {

    override val documentType = DocumentType.TRADE

    override fun getCount(context: JobContext, response: JSONObject): Int {
        TODO("Not yet implemented")
    }

    override fun buildDocuments(context: JobContext, response: JSONObject): List<Document> {
        TODO("Not yet implemented")
    }
}

// 退单
@Component
class KlRefundPorter : KlPorter() {

    override val documentType = DocumentType.REFUND

    override fun getCount(context: JobContext, response: JSONObject): Int {
        TODO("Not yet implemented")
    }

    override fun buildDocuments(context: JobContext, response: JSONObject): List<Document> {
        TODO("Not yet implemented")
    }
}